<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .parent {
      font-size: 30px;
    }

    .child {
      font-size: 2em;
    }
    .rem {
      font-size: 30px;
    }

    .rem_child {
      font-size: 2rem;
    }
  </style>
</head>

<body>
  <div class="parent">
    <div class="child">123</div>
  </div>
  <div class="rem">
    <div class="rem_child">456</div>
  </div>
</body>

</html>